package org.edu.modules.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author lbh
 * @Date 2025/2/14 下午4:30
 * @Version 1.0
 */
@Data
@TableName("process_instance")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "process_instance对象", description = "流程实例")
public class ProcessInstance {
    /**流程实例ID*/
    @Excel(name = "流程实例ID", width = 15)
    @ApiModelProperty(value = "流程实例ID")
    private Long id;
    /**关联流程类型ID*/
    @Excel(name = "关联流程类型ID", width = 15)
    @ApiModelProperty(value = "关联流程类型ID")
    private Integer processTypeId;
    /**申请人ID*/
    @Excel(name = "申请人ID", width = 15)
    @ApiModelProperty(value = "申请人ID")
    private String applicantId;
    /**当前状态*/
    @Excel(name = "当前状态", width = 15)
    @ApiModelProperty(value = "当前状态")
    private String currentStatus;
    /**当前步骤序号*/
    @Excel(name = "当前步骤序号", width = 15)
    @ApiModelProperty(value = "当前步骤序号")
    private Integer currentStep;
    /**创建时间*/
    @Excel(name = "创建时间", width = 15)
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;
    /**更新时间*/
    @Excel(name = "更新时间", width = 15)
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;

    /**申请人名称*/
    @Excel(name = "申请人名称", width = 15)
    @ApiModelProperty(value = "申请人名称")
    @TableField(exist = false)
    private String applicantName;
    /**流程名称*/
    @Excel(name = "流程名称", width = 15)
    @ApiModelProperty(value = "流程名称")
    @TableField(exist = false)
    private String processTypeName;
    /**当前节点审批人*/
    @Excel(name = "当前节点审批人", width = 15)
    @ApiModelProperty(value = "当前节点审批人")
    @TableField(exist = false)
    private String currentApproveName;
    /**当前节点名称*/
    @Excel(name = "当前节点名称", width = 15)
    @ApiModelProperty(value = "当前节点名称")
    @TableField(exist = false)
    private String currentStepName;

    /**当前状态名称*/
    @Excel(name = "当前状态名称", width = 15)
    @ApiModelProperty(value = "当前状态名称")
    @TableField(exist = false)
    private String currentStatusName;


}
